package com.whfc.fuum.dao;

import com.whfc.fuum.dto.SysExternalLinkDTO;
import com.whfc.fuum.entity.SysExternalLink;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author qzexing
 * @version 1.0
 * @date 2020-10-29 14:55
 */
@Repository
public interface SysExternalLinkMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysExternalLink record);

    int insertSelective(SysExternalLink record);

    SysExternalLink selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysExternalLink record);

    int updateByPrimaryKey(SysExternalLink record);

    /**
     * 获取外链地址
     *
     * @param deptId 组织机构ID
     * @param code   模块编码
     * @return 外链地址
     */
    SysExternalLinkDTO selectExternalLinkDTO(@Param("deptId") Integer deptId, @Param("code") String code);

    /**
     * 统计数量
     *
     * @param deptId
     * @param code
     * @return
     */
    int countByDeptIdAndCode(@Param("deptId") Integer deptId, @Param("code") String code);
}